home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / gag / MemoMile.lha / NoMem.mod < prev   
Text File  |  1994-10-12  |  869b  |  47 lines

  1. MODULE NoMem;
  2.  
  3. IMPORT
  4.     I:Intuition,
  5.     y:SYSTEM,
  6.     u:Utility,
  7.     g:Graphics,
  8.     d:Dos,
  9.     io,
  10.     Break,
  11.     e:Exec;
  12.  
  13. VAR
  14.     wn:I.WindowPtr;
  15.     to,ac:LONGINT;
  16.     n,m:INTEGER;
  17.  
  18. BEGIN;
  19. wn:=I.OpenWindowTagsA(NIL,I.waInnerHeight,15,I.waInnerWidth,100,
  20.  I.waTitle,y.ADR("MemoMile"),
  21.  I.waFlags,LONGSET{I.activate,I.windowDrag,I.windowDepth},u.done);
  22. REPEAT;
  23. to:=e.AvailMem(LONGSET{e.total});
  24. ac:=e.AvailMem(LONGSET{});
  25. n:=SHORT(ac*100 DIV to);
  26. g.SetAPen(wn.rPort,3);
  27. FOR m:=0 TO n-1 DO
  28.  g.Move(wn.rPort,wn.borderLeft+m,wn.borderTop);
  29.  g.Draw(wn.rPort,wn.borderLeft+m,wn.borderTop+14);
  30. END;
  31. g.SetAPen(wn.rPort,0);
  32. FOR m:=n TO 99 DO
  33.  g.Move(wn.rPort,wn.borderLeft+m,wn.borderTop);
  34.  g.Draw(wn.rPort,wn.borderLeft+m,wn.borderTop+14);
  35. END;
  36. IF n>3 THEN
  37. IF e.AllocMem(16384,LONGSET{})#NIL THEN END;
  38. END;
  39. d.Delay(30);
  40. UNTIL FALSE;
  41. CLOSE
  42. I.CloseWindow(wn);
  43. END NoMem.
  44.  
  45.  
  46.  
  47.